<?php
	$lienkettemp = new lienketbs();
	$danhsachtemp = $lienkettemp->LayDanhSach();
	for($j = 0; $j < ($danhsachtemp == false ? 0 : count($danhsachtemp)); $j++)
	{
        if(isset($_POST[$danhsachtemp[$j]["MaLienKet"]]))
        {
			$lienkettemp->MaLienKet = $danhsachtemp[$j]["MaLienKet"];
			$lienkettemp->Xoa();	
        }
    }
    session_start();
    $nhatky = new nhatkybs();
    $nhatky->TenSuKien = "Xóa liên kết được chọn";
    $nhatky->MaNguoiDung = $_SESSION["MaND"];
    date_default_timezone_set('Asia/Ho_Chi_Minh');
    $nhatky->ThoiGian = date("Y-m-d H:m:s", time());
    $nhatky->Them();
	header("Location:index.php?do=lienket");
?>